﻿using System;

namespace Event.Authentication.EventPattern
{
    public class EmailService
    {
        private readonly UserService _userService;

        public EmailService(UserService userService)
        {
            _userService = userService;
            _userService.UserRegistered += SendEmail;
        }

        public void SendEmail(UserRegisteredEventArgs user)
        {
            Console.WriteLine("send email successfully");
        } 
    }
}